<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="common/header.jsp"%>
		
		<div class="center">
			<div class="col-main">
				<div class="main-wrap">
					<div class="wrap-left">
						<div class="wrap-list">
							
							<div class="box-container-bottom"></div>

							<!--订单 -->
							<div class="m-order">
								<div class="s-bar">
									<i class="s-icon"></i>我的订单
								</div>
								<c:forEach var="bill" items="${bill}">
									<div class="orderContentBox">
										<div class="orderContent">
											<div class="orderContentpic">
												<div class="imgBox">
													<a href="orderinfo.html"><img src="/pic/${bill.org_pic}"></a>
												</div>
											</div>
											<div class="detailContent">
												<c:if test="${bill.proType==1 }">
													<a href="${pageContext.request.contextPath }/user/orderInfo?proType=1&b_id=${bill.b_id}" class="delivery">${bill.p_Name}</a>
												</c:if>
												<c:if test="${bill.proType==2 }">
													<a href="${pageContext.request.contextPath }/user/orderInfo?proType=2&b_id=${bill.b_id}" class="delivery">${bill.p_Name}</a>
												</c:if>
												<c:if test="${bill.proType==4 }">
													<a href="${pageContext.request.contextPath }/user/orderInfo?proType=4&b_id=${bill.b_id}" class="delivery">${bill.p_Name}</a>
												</c:if>
												
												
												<div class="orderID">
													<span class="time"><fmt:formatDate value="${bill.createDate}"/> </span>
												</div>
											</div>
											<div class="state">
												<c:if test="${bill.status==1 && bill.isPay==1}">已成交</c:if>
												<c:if test="${bill.status==0 && bill.isPay==1}">待商家确认</c:if>
												<c:if test="${bill.isPay==0}">未支付</c:if>
											</div>
											<div class="price"><span class="sym">${bill.totalPrice}</div>
	
										</div>
										<c:if test="${bill.status==1 && bill.isPay==1}">
										<a href="${pageContext.request.contextPath }/user/delete?b_id=${bill.b_id}" class="btnPay"
											onclick="if(confirm('确定删除订单?')==false)return false;">删除订单</a>
										</c:if>
										<c:if test="${bill.isPay==0}">
										<a href="${pageContext.request.contextPath }/user/payment?proType=${bill.proType}&b_id=${bill.b_id}&isPay=1" class="btnPay" 
											onclick="if(confirm('确定支付?')==false)return false;">支付订单</a>
										</c:if>
										<c:if test="${bill.isPay==1 && bill.status==0}">
										<a href="javascript:void(0);" class="btnPay">提醒商家确认</a>
										</c:if>
									</div>

								</c:forEach>
								<div class="row">
										<div class="col-sm-5">
											<div class="dataTables_info" id="datatable-responsive_info"
												role="status" aria-live="polite">共${pages.totalCount }条记录
												${pages.currentPageNo }/${pages.totalPageCount }页</div>
										</div>
										<div class="col-sm-7">
											<div class="dataTables_paginate paging_simple_numbers"
												id="datatable-responsive_paginate">
												<ul class="pagination">
													<c:if test="${pages.currentPageNo > 1}">
														<li class="paginate_button previous"><a
															href="${pageContext.request.contextPath }/user/orderAll.html?pageIndex=1&u_id=${u_id}&proType=${proType}"
															aria-controls="datatable-responsive" data-dt-idx="0"
															tabindex="0">首页</a>
														</li>
														<li class="paginate_button "><a
															href="${pageContext.request.contextPath }/user/orderAll.html?pageIndex=${pages.currentPageNo-1}"
															aria-controls="datatable-responsive" data-dt-idx="1"
															tabindex="0">上一页</a>
														</li>
													</c:if>
													<c:if test="${pages.currentPageNo < pages.totalPageCount }">
														<li class="paginate_button "><a
															href="${pageContext.request.contextPath }/user/orderAll.html?pageIndex=${pages.currentPageNo+1 }"
															aria-controls="datatable-responsive" data-dt-idx="1"
															tabindex="0">下一页</a>
														</li>
														<li class="paginate_button next"><a
															href="${pageContext.request.contextPath }/user/orderAll.html?pageIndex=${pages.totalPageCount }"
															aria-controls="datatable-responsive" data-dt-idx="7"
															tabindex="0">最后一页</a>
														</li>
													</c:if>
												</ul>
											</div>
										</div>
								</div>
							</div>
						</div>
					</div>
					
     				<div class="clear"></div>
     				
     				<!--收藏和足迹-->
     				 


				</div>
				<!--底部-->
				<div class="footer">
					<div class="footer-hd">
						<p>
							<a href="#">由来游去</a>
							<b>|</b>
							<a href="#">商城首页</a>
							<b>|</b>
							<a href="#">支付宝</a>
							<b>|</b>
							<a href="#">详情</a>
						</p>
					</div>
					<div class="footer-bd">
						<p>
							<a href="#">关于我们</a>
							<a href="#">合作伙伴</a>
							<a href="#">联系我们</a>
							<a href="#">网站地图</a>
						</p>
					</div>
				</div>

			</div>
			
<%@include file="common/footer.jsp"%>
	</body>
<script>
</script>
</html>